<f:view
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>

	<ui:decorate template="/facelets/template/mainTemplate.xhtml">
		<f:loadBundle basename="bundle.department" var="departmentBundle"/>
		<f:loadBundle basename="bundle.common" var="commonBundle2"/>
		<f:loadBundle basename="bundle.plan" var="planBundle"/>
		<ui:param name="title" value="Plan details"/>
		<ui:define name="center">
			<ui:decorate template="/facelets/template/centerTemplate.xhtml">
				<ui:define name="content">
					<ui:decorate template="/facelets/template/planPanelTemplate.xhtml">
					</ui:decorate>
					<a4j:form>
						<a4j:commandLink value="#{planBundle.backToContentPlans}" action="toPlanDetails"/>
					</a4j:form>
					<ui:decorate template="/facelets/template/scrollableTableTemplate.xhtml">
						<ui:param name="title" value="Sessions List"/>
						<ui:param name="actionBean" value="#{sessionPlanBean}"/>
						<ui:param name="idPrefix" value="sessionPlanlist"/>
						<ui:param name="showAddLink" value="true"/>
						<ui:define name="editPanelContext">
							<h:panelGrid columns="3">

								<h:outputText value="#{planBundle.beginDate}"/>

								<rich:calendar value="#{sessionPlanBean.record.beginDate}" id="#{idPrefix}BeginDate"
											   inputSize="14"/>
								<itdep:errorMessage for="#{idPrefix}BeginDate"/>

								<h:outputText value="#{planBundle.finishDate}"/>

								<rich:calendar value="#{sessionPlanBean.record.finishDate}" id="#{idPrefix}FinishDate"
											   inputSize="14"/>
								<itdep:errorMessage for="#{idPrefix}FinishDate"/>
								<h:outputText value="#{planBundle.semester}"/>
								<h:selectOneListbox value="#{sessionPlanBean.record.term}" id="term"
													style="width:50px" size="1">
									<f:selectItem itemValue="1"/>
									<f:selectItem itemValue="2"/>
									<f:selectItem itemValue="3"/>
									<f:selectItem itemValue="4"/>
									<f:selectItem itemValue="5"/>
									<f:selectItem itemValue="6"/>
									<f:selectItem itemValue="7"/>
									<f:selectItem itemValue="8"/>
									<f:selectItem itemValue="9"/>
									<f:selectItem itemValue="10"/>
									<f:selectItem itemValue="11"/>
									<f:selectItem itemValue="12"/>
								</h:selectOneListbox>
								<itdep:errorMessage for="#{idPrefix}Term"/>
							</h:panelGrid>
						</ui:define>
						<ui:define name="tableContext">
							<rich:column>
								<f:facet name="header"><h:outputText value="#{planBundle.beginDate}"/></f:facet>
								<h:outputText value="#{record.beginDate}"/>
							</rich:column>
							<rich:column>
								<f:facet name="header"><h:outputText
										value="#{planBundle.finishDate}"/></f:facet>
								<h:outputText value="#{record.finishDate}"/>
							</rich:column>

							<rich:column>
								<f:facet name="header"><h:outputText value="#{planBundle.semester}"/></f:facet>
								<h:outputText value="#{record.term}"/>

							</rich:column>


						</ui:define>
					</ui:decorate>
				</ui:define>


			</ui:decorate>

		</ui:define>
	</ui:decorate>

</f:view>